package cn.zktr.Personnel.controllers.tanyali;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.zktr.Personnel.model.service.tanyali.EmaOutService;
import cn.zktr.Personnel.model.service.tanyali.EmaTrtsService;
@Controller
public class EmaOutController {
	@Autowired
	private EmaOutService outservice;
	
	/**
	 * @author 培训结果传数据
	 *
	 */
	@RequestMapping("tyl/pi-gai-shi-juan")
	public void demo2() {}
	
	@RequestMapping("pigaishijuan")
	@ResponseBody
	public Map<String,Object> SalaryAccounttable(int page,int rows){
		Map<String,Object> map = new HashMap<>();
		map.put("total",outservice.pigaishijuanselect().size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray findAll=outservice.pigaishijuanselect();
		//页内容
		map.put("rows",findAll);
		return map;
	}
	
	@RequestMapping("selectSJRY")
	@ResponseBody
	public JSONArray selectSJ(String zkzrem){
		return outservice.selectSJ(zkzrem);
	}
}
